package me.shiqiang.im.service;

import me.shiqiang.im.vo.Group;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * Created by John on 2018/5/17
 */
@Service
@CacheConfig(cacheNames = "chatSwitch")
public class ChatSwitchService {

    @Autowired
    UserClient userClient;

    @Cacheable(key = "'cs'+#userId")
    public boolean chatSwitch(Long userId){
        return userClient.chatSwitchForBusiness(userId);
    }
}
